package com.tju320.elm.view.impl;

import java.util.Scanner;

import com.tju320.elm.dao.AdminDao;
import com.tju320.elm.dao.impl.AdminDaoImpl;
import com.tju320.elm.po.Admin;
import com.tju320.elm.view.AdminView;

public class AdminViewImpl implements AdminView{
	Scanner keyboardInput = new Scanner(System.in);
	@Override
	public Admin login() {
		System.out.println("请输入管理员名称:");
		String adminName=keyboardInput.next();
		System.out.println("请输入密码");
		String password=keyboardInput.next();
		AdminDao admindao=new AdminDaoImpl();
		return admindao.getAdminByNameByPass(adminName, password);
	}
	public static void main(String[] args) {
		System.out.println(new AdminViewImpl().login());
	}

}
